import request from '@/utils/request'
import { getToken } from '@/utils/auth'

export function login(data){
    return request({
        url:"/api/login",
        method:"post",
        data:data,
    })
}
// 获取登录信息
export function getLoginInfo(){
    return request({
        url:"/api/login/info",
        method:"get",
        headers:{
            'Satoken': getToken()
        }
    })
}

// 退出登录
export function logout(){
    return request({
        url:"/api/login/logout",
        method:"get",
        headers:{
            'Satoken': getToken()
        }
    })
}